<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>

<html>
<head>
<title>iPecker Robot Web Configuration</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
<link rel="stylesheet" type="text/css" href="styles/masakiForm.css">
<meta http-equiv="pragma" content="no-cache">
<link href="styles/huaxia.common.validator.css" rel="stylesheet"
	type="text/css" />
<link href="styles/huaxia.common.message.css" rel="stylesheet"
	type="text/css" />
<link href="styles/huaxia.common.input.css" rel="stylesheet"
	type="text/css" />

<script type="text/javascript" src="scripts/public.prototype.js"></script>
<script type="text/javascript" src="scripts/huaxia.common.validator.js"></script>
<script type="text/javascript" src="scripts/huaxia.common.message.js"></script>


<style type="text/css">
a.modify {
	padding: 0px 0px 0px 16px;
	background-image: url("images/setting.gif");
	background-repeat: no-repeat;
	background-position: 0px center;
}

a.delete {
	padding: 0px 0px 0px 16px;
	background-image: url("images/email.gif");
	background-repeat: no-repeat;
	background-position: 0px center;
}

a.setting {
	padding: 0px 0px 0px 16px;
	background-image: url("images/setting.gif");
	background-repeat: no-repeat;
	background-position: 0px center;
}

.contact span {
	display: inline;
	background-repeat: no-repeat;
	background-position: 0px center;
	padding: 0px 0px 0px 16px;
	margin: 0px 4px;
}

.contact span.phone {
	background-image: url("images/phone.gif");
}

.contact span.mobile {
	background-image: url("images/mobile.gif");
}
</style>

</head>
<body style="background-color: #FDFDFD;"> 
<center>
<div id="errormsgspace" style="display: none; width: 600px"></div>
<div id="successmsgspace" style="display: none; width: 600px"></div>

<form id="frminput" name="frminput" action="" method="post">
<table width="600" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td class="title" width="7"><img src="images/arc.gif" width="7"
				height="24"></td>
			<td class="title" valign="middle" width="100%" align="left">系统配置</td>
		</tr>
		<tr>
			<td colspan="2">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tbody>
					<tr>
						<td width="500" align="center">
						<table class="space" width="100%" align="center" border="0"
							cellpadding="0" cellspacing="0">
							<tbody>
								<tr>
									<td>基本参数</td>
								</tr>
							</tbody>
						</table>
						<table class="space" width="100%" border="1" cellpadding="0"
							cellspacing="0">
							<tbody>
								<tr>
									<td>
									<table border="0">
										<tbody>											
											<tr>
												<td>连接名称：</td>
												<td>${configBean.adapterName}<input name="adapterName" id="adapterName" maxlength="64" type="hidden" value="${configBean.adapterName}"></td>
											</tr>
											<tr>
												<td>Mac 地址：												
												    </td>
												<td>${configBean.macAddress} <input name="macAddress" id="macAddress" value="${configBean.macAddress}"
													size="32" maxlength="32" type="hidden"></td>
											</tr>											
											<tr>
												<td>IP地址：</td>
												<td><input name="hostIp" property="IP地址"
													class="required" id="hostIp" value="${configBean.hostIp}"
													size="32" maxlength="32" type="text">
													
													<input name="subnetMask" id="subnetMask" value="${configBean.subnetMask}"
													size="32" maxlength="32" type="hidden">
													
													<input name="gateway" id="gateway" value="${configBean.gateway}"
													size="32" maxlength="32" type="hidden">													
													</td>
											</tr>											
											<tr>
												<td>系统时间：</td>
												<td><input name="systemDate" property="日期"
													class="required" id="systemDate" value="${configBean.systemDate}"
													 maxlength="12" type="text" style="width:100px;">&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;
													 <input name="systemTime" property="时间"
													class="required" id="systemTime" value="${configBean.systemTime}"
													 maxlength="12" type="text" style="width:100px;"><font color="green" >&nbsp;&nbsp; 2010-10-10 -- 00:00:00</font></td>
											</tr>
											<tr>
												<td>NTP服务器：</td>
												<td><input name="timeServer" property="NTP服务器"
													class="validate[required,ajax[ajaxUser]] text-input"
													id="sss" value="time.windows.com" size="32" maxlength="32"
													type="text"></td>
											</tr>
											<!-- 
											<tr>
												<td>NTP状态：</td>
												<td><select name="ntpStatus" id ="ntpStatus" style="width:75px">
												　　　<option value="1">开启 </option>
												　　　<option value="0">关闭 </option>												
												</select></td>
											</tr>
											 -->
										</tbody>
									</table>
									</td>
								</tr>
							</tbody>
						</table>
						</td>
						<td class="vline" rowspan="15"><br>
						</td>
					</tr>
					<tr>
						<td class="hline"><img src="images/empty.gif" width="1"
							height="1"></td>
					</tr>
					<tr>
						<td class="tail" height="30">&nbsp;&nbsp;<input name="Save"
							class="button" id="Save" value="保 存" type="button"
							onclick="frm_submit(this.form)"> &nbsp;&nbsp;<input
							name="help" class="button" id="help" value="取消"
							onClick="doHelp();" type="button"></td>
					</tr>
					<tr>
						<td class="hline"><img src="images/empty.gif" width="1"
							height="1"></td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
	</tbody>
</table>
</form>

<script type="text/javascript">
			<c:set var="exceptionType">org.apache.struts.action.EXCEPTION</c:set>
			<c:set var="exception" value="${requestScope[exceptionType]}" />
			var error_msgs = new messager('errormsgspace',{messageType : 'ERROR', isImmediate : true});
			
			<c:if test="${exception != null}">
					error_msgs.addMessage('${exception.message}','<bean:message key="${exception.message}" bundle="${exception.bundle}" />');
			</c:if>
			
			var success_msgs = new messager('successmsgspace',{messageType : 'INFORMATION', isImmediate : true});
			
			<c:forEach var='message' items="${MessageCenter.messages}">
					success_msgs.addMessage('${message.message}','<bean:message key="${message.message}" bundle="${message.bundle}" />');
			</c:forEach>

			function msgAppender(element, message){
					error_msgs.addMessage('hxv-' + element.id,message);
			}
									
			function msgRemover(element){
					error_msgs.removeMessage('hxv-' + element.id);
			}
</script> 

<script type="text/javascript">
var validator = new hxvalidator('frminput',{messageAppender : msgAppender,messageRemover : msgRemover});

function frm_submit(obj){	
	obj.action="RobotSystemCfgModifyAction.do";
	if(!validator || validator.validate()){   	
	    obj.submit();      
    }
}
</script></center>
</body>
</html>